<template>
  <BasicModal :visible="visible" :title="title" :min-height="50" :height="50">
    <span>你确定要删除 "{{ data.name }}" 吗？</span>
    <template #footer>
      <a-button @click="handleCancel">取消</a-button>
      <a-button type="primary" @click="handleOk">确定</a-button>
    </template>
  </BasicModal>
</template>

<script>
  import { BasicModal } from '/@/components/Modal'

  export default {
    components: {
      BasicModal,
    },
    props: {
      visible: {
        type: Boolean,
        default: false,
      },
      title: {
        type: String,
        default: '',
      },
      data: {
        type: Object,
        default: null,
      },
    },
    emits: ['ok', 'cancel'],
    methods: {
      handleOk() {
        this.$emit('ok', this.data)
      },
      handleCancel() {
        this.$emit('cancel')
      },
    },
  }
</script>
